package org.ncibi.cytoscape.metscape.action;

import java.awt.event.ActionEvent;

import org.ncibi.cytoscape.metscape.ui.SelectDataDialog;

import cytoscape.util.CytoscapeAction;

@SuppressWarnings("serial")
public class SelectExperimentalDataAction extends CytoscapeAction {
	
	public static final String NAME = "Select Experimental Data...";
	
	/**
	 * The constructor sets the text that should appear on the menu item.
	 */
	public SelectExperimentalDataAction() {
		super(NAME);
	}

	/**
	 * This method is called when the user selects the menu item.
	 */
	public void actionPerformed(ActionEvent ae) {
		if(SelectDataDialog.selectExperimentalData()) {
			if(BuildNetworkAction.getPanel() != null) {
				BuildNetworkAction.getPanel().refresh();
			}
			BuildNetworkAction.exec();
		}
	}		
}